package com.endoc.news.fragment.newslist.view.titleview;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.databinding.DataBindingUtil;

import com.endoc.news.R;
import com.endoc.news.databinding.TitleViewBinding;
import com.endoc.news.fragment.base.BaseCustomView;
import com.endoc.news.fragment.base.IBaseCustomView;
import com.endoc.news.fragment.base.BaseViewModel;

public class TitleView extends BaseCustomView<TitleViewBinding,TitleViewModel> {

    //private TitleViewBinding mTitleViewBinding;

    public TitleView(@NonNull Context context) {
        super(context);
        //init(context);
    }

    @Override
    public void setViewModelToView(TitleViewModel titleViewModel) {
        mViewBinding.setViewModel(titleViewModel);
    }

    @Override
    public int getResourceId() {
        return R.layout.title_view;
    }

    @Override
    public void onclick(View v) {

    }

  /*  private void init(Context context) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.title_view, this, false);
        mTitleViewBinding = DataBindingUtil.bind(inflate);
        addView(mTitleViewBinding.getRoot());
    }*/

   /* @Override
    public void setData(BaseViewModel viewModel) {
        mTitleViewBinding.setViewModel((TitleViewModel) viewModel);
        mTitleViewBinding.executePendingBindings();
    }*/
}
